from flask import Flask, render_template, request,redirect
from storys.registration import Registration
from storys.login import Login
from storys.vitalSigns import VitalSigns
from storys.public import Public
from storys.medication import Medication
from storys.diet import Diet
from storys.note import Note
from storys.doctor import Doctor
from storys.appointment import Appointment
from storys.communication import Communication
from storys.search import Search

app = Flask(__name__)
app.config['SECRET_KEY'] = 'why would I tell you my secret key?' # 设置session key

app.register_blueprint(Registration,url_prefix='/Registration')
app.register_blueprint(Login,url_prefix='/Login')
app.register_blueprint(VitalSigns,url_prefix='/VitalSigns')
app.register_blueprint(Public,url_prefix='/Public')
app.register_blueprint(Medication,url_prefix='/Medication')
app.register_blueprint(Diet,url_prefix='/Diet')
app.register_blueprint(Note,url_prefix='/Note')
app.register_blueprint(Doctor,url_prefix='/Doctor')

app.register_blueprint(Appointment,url_prefix='/Appointment')
app.register_blueprint(Communication,url_prefix='/Communication')
app.register_blueprint(Search,url_prefix='/Search')

@app.route('/', methods=['GET', 'POST'])
def index():
    print("wellcome!")
    return redirect('/Login/',code=301)

if __name__ == "__main__":
    app.run()


